package com.adulcimer.models.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Simon
 * @create 2025/2/6
 * @Description
 **/

@Getter
@AllArgsConstructor
public enum CommonStatusEnum {
    ENABLE(1,"启用",true),
    DISABLE(0,"禁用",false),
    ;
    private final Integer value;
    private final String text;
    private final Boolean status;

    public static CommonStatusEnum getEnum(Boolean status) {
        for (CommonStatusEnum e : CommonStatusEnum.values()) {
            if (e.getStatus().equals(status)) {
                return e;
            }
        }
        return null;
    }
}
